/**
 * 
 */
package com.maxin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.maxin.entity.Busertable;

/**
 * @author: maxin
 * @description: 
 */
public interface BusertableMapper {
	
	@Insert("insert into busertable values(#{id}, #{bemail}, #{bpwd})")
	int insert(Busertable busertable);
	
	@Delete("delete from busertable where id = #{id}")
	int deleteById(long id);
	
	@Update("update from busertable set bemail = #{bemail}, bpwd = #{bpwd} where id = #{id}")
	int update(Busertable busertable);
	
	@Update("update from busertable set bpwd = #{bpwd} where id = #{id}")
	int updatePwd(Busertable busertable);
	
	@Select("select * from busertable where id = #{id}")
	Busertable selectById(long id);
	
	@Select("select * from busertable where bemail = #{bemail}")
	Busertable selectByEmail(String email);
	
	@Select("select * from busertable")
	List<Busertable> selectAll();
	
}
